package com.project.quiktask.controller;

import java.util.Comparator;
import com.project.quiktask.Task;
import com.project.quiktask.util.Variable;

public class ImportanceComparator implements Comparator<Task> {
	
	public int compare(Task task1, Task task2) {
    	if (task1.getImportance() && !task2.getImportance())
    		return Variable.FIRST_TASK_MORE_IMPORTANCE;
    	else if (!task1.getImportance() && task2.getImportance())
    		return Variable.SECOND_TASK_MORE_IMPORTANCE;
    	else 
    		return Variable.EQUAL_IMPORTANCE;
    }
 }